home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CUT - Field Cut Utility
-
-
- NAME
-
- CUT - cut out specified fields from each line of a file
-
- SYNOPSIS
-
- cut [-s] [-t<format>] [-d<string>] <-c<list> | -f<list>> file ...
-
- DESCRIPTION
-
- Cut will cut out fields from each line of the files
- specified as input arguments. The fields specified may be
- of fixed length, or separated by any number of delimiter
- characters. If no file arguments are specified, cut will
- act as a filter, using standard input.
-
- Cut may be used with the following options;
-
- -f<list>
- the list following the -f option is a comma
- separated list of integers specifying the
- field numbers which will be cut from the
- input.
-
- -c<list>
- specify character column numbers from which
- output will be cut, e.g., 5-80, 1,8, etc.
- All characters within the specified columns
- will be output.
-
- Note that either the -c or -f options, but not both
- must be specified.
-
- -d<string>
- All characters in the specified string will
- be considered delimiters when used with the
- -f option. The default delimiters are space
- and tab. The tab character can be repre-
- sented as \t. Spaces and other characters
- with special meaning must be enclosed in
- quotes.
-
- -s
- The -s option will suppress the output of
- lines which contain no delimiters. The
- default is to output the entirety of lines
- which do not contain any delimiters. This
- option is only used with the -f option.
-
-
-
-
-
- CUT - Field Cut Utility Page 1
- Copyright (c) 1986, Syncom, Inc.
-
-
-
-
-
-
-
-
- CUT - Field Cut Utility
-
-
-
- -t<string>
- The -t option specifies a string to be used
- as a format string for output. Field argu-
- ments are placed by use of the %s format
- specifier. Note that since the '%' character
- is treated specially by command.com in the
- execution of batch files, it must be
- specified as %% when used in a batch file.
-
-
- EXAMPLES
- dir | cut -f1,2 -t"%s.%s"
-
- will output the (reformatted) file names in a directory,
- (plus some other junk).
-
-
- cut -c1,20 file1 >file2
-
- will output the first 20 columns from file1 to file2.
-
-
-
-
-
-
- Release Note:
- Version 1.01 supports multiple input files on the command line
-
-
-
-
-
-
-
- Any comments, suggestions or criticisms;
-
- Bob Halsall
- c/o Eastern 'C' Board
- Suffern, NY
- (914)-368-0658
-
- If you find yourself using this program, please send
- a few dollars to ( the hardest part will be addressing the envelope!) :
-
- The American Cancer Society
- 90 Park Avenue
- New York, New York 10016
-
-